//
// Created by lfm on 25-4-20.
//
#include <iostream>
using namespace std;


void test01()
{
    string str = "abcdef";

    string subStr = str.substr(1, 3);

    cout << "subStr = " << subStr << endl;
}

void test02()
{
    string email = "zhangsan@sina.com";
    //从邮件地址 获取 用户名信息

    int pos = email.find("@");
    string usrName = email.substr(0, 8);
    cout << usrName << endl;

}

int main()
{
    test01();
    test02();
    return 0;
}